Page({
  data: {
    //选中的下标
    activeIndex: 0,
  },
  //图片切换，把图片的下标渲染到视图层
  myChange(e) {
    let current = e.detail.current;
    this.setData({
      activeIndex: current,
    });
  },
  //点击方块，把方块的下标渲染到视图层
  itemClick(e) {
    let index = e.currentTarget.dataset.index;
    this.setData({
      activeIndex:index
    })

  },
});
